<script setup>
	import { message } from 'ant-design-vue'
	import aiApi from '@/api/ai/aiApi'
	import aiChatApi from '@/api/ai/aiChatApi'
	import aiChatHistoryApi from '@/api/ai/aiChatHistoryApi'
	import { nanoid } from 'nanoid'
	import { h } from 'vue'
	import { SendOutlined } from '@ant-design/icons-vue'
	import AiEngine from './engine.js'
	import router from '@/router'
	import tool from '@/utils/tool'
	import {config} from './aiPageConfig.js'

	const comp = ref()
	onMounted(async () => {
		const route = router.currentRoute.value
		console.log(route)
		comp.value = config[route.name]
		if (!comp.value) {
			comp.value = config.default
		}
	})

</script>

<template>
	<div>
		<component :is="comp"></component>
	</div>
</template>

<style scoped lang="less">
	.ant-tag {
		white-space: break-spaces;
	}
</style>
